<?php

namespace backend\modules\home\models;

use Yii;

/**
 * This is the model class for table "lw_message".
 *
 * @property int $id
 * @property string $username
 * @property string $phone
 * @property string $cont
 * @property string $remark
 * @property int $status
 * @property int $create_time
 */
class Message extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'lw_message';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['cont'], 'string'],
            [['create_time', 'status'], 'integer'],
            [['username'], 'string', 'max' => 64],
            [['phone'], 'string', 'max' => 30],
            [['remark'], 'string', 'max' => 128],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'username' => '用户名',
            'phone' => '电话号码',
            'cont' => '留言内容',
            'remark' => '备注',
            'status' => '状态',
            'create_time' => '创建时间',
        ];
    }
}
